import { MockMethod } from 'vite-plugin-mock'
import { ResultEnum, ResponseEnum } from '@/enums/HttpEnum'
const BASE_URL = '/mock-api/system'
const list = [
  {
    name: 'Demo',
    path: '/demo',
    component: 'Layout',
    meta: {
      alwaysShow: true,
      hidden: false,
      title: '组件演示',
      icon: 'setting',
      keepAlive: true,
      full: false,
      affix: false,
      link: null
    },
    children: [
      {
        name: 'icon',
        path: 'icon',
        component: 'demo/icon/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '图标选择',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },

      {
        name: 'Form',
        path: 'form',
        component: 'demo/form/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '表单',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Dialog',
        path: 'dialog',
        component: 'demo/dialog/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '弹框',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Drawer',
        path: 'drawer',
        component: 'demo/drawer/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '抽屉',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Table',
        path: 'table',
        component: 'demo/table/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '列表',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      }
    ]
  },
  {
    name: 'System',
    path: '/system',
    component: 'Layout',
    meta: {
      alwaysShow: true,
      hidden: false,
      title: '系统管理',
      icon: 'setting',
      keepAlive: true,
      full: false,
      affix: false,
      link: null
    },
    children: [
      {
        name: 'User',
        path: 'user',
        component: 'system/user/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '用户管理',
          icon: 'el-icon-Avatar',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Role',
        path: 'role',
        component: 'system/role/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '角色管理',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Menu',
        path: 'menu',
        component: 'system/menu/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '菜单管理',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Dept',
        path: 'dept',
        component: 'system/dept/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '部门管理',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Post',
        path: 'post',
        component: 'system/post/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '岗位管理',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Dict',
        path: 'dict',
        component: 'system/dict/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '字典管理',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Log',
        path: 'monitor',
        redirect: 'noRedirect',
        meta: {
          alwaysShow: true,
          hidden: false,
          title: '日志管理',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        },
        children: [
          {
            name: 'Operlog',
            path: 'operlog',
            component: 'monitor/operlog/index',
            meta: {
              alwaysShow: false,
              hidden: false,
              title: '操作日志',
              icon: 'setting',
              keepAlive: true,
              full: false,
              affix: false,
              link: null
            }
          },
          {
            name: 'Logininfor',
            path: 'logininfor',
            component: 'monitor/logininfor/index',
            meta: {
              alwaysShow: false,
              title: '登录日志',
              hidden: false,
              icon: 'setting',
              keepAlive: true,
              full: false,
              affix: false,
              link: null
            }
          }
        ]
      },
      {
        name: 'Oss',
        path: 'oss',
        component: 'system/oss/index',
        meta: {
          alwaysShow: false,
          title: '文件管理',
          hidden: false,
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'config',
        path: 'config',
        component: 'system/config/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '系统配置',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      }
    ]
  },
  {
    name: 'Monitor',
    path: '/monitor',
    redirect: 'noRedirect',
    component: 'Layout',
    meta: {
      alwaysShow: true,
      hidden: false,
      title: '系统监控',
      icon: 'setting',
      keepAlive: false,
      full: false,
      affix: false,
      link: null
    },
    children: [
      {
        name: 'Powerjob',
        path: 'powerjob',
        component: 'monitor/powerjob/index',
        meta: {
          alwaysShow: false,
          title: '任务调度',
          hidden: false,
          icon: 'setting',
          keepAlive: false,
          full: false,
          affix: false,
          link: null
        }
      },
      {
        name: 'Admin',
        path: 'admin',
        component: 'monitor/admin/index',
        meta: {
          alwaysShow: false,
          title: '服务监控',
          hidden: false,
          icon: 'server',
          keepAlive: false,
          full: false,
          affix: false,
          link: null
        }
      }
    ]
  },
  {
    name: 'Tool',
    path: '/tool',
    redirect: 'noRedirect',
    component: 'Layout',
    meta: {
      alwaysShow: true,
      hidden: false,
      title: '系统工具',
      icon: 'setting',
      keepAlive: true,
      full: false,
      affix: false,
      link: null
    },
    children: [
      {
        name: 'gen',
        path: 'gen',
        component: 'tool/gen/index',
        meta: {
          alwaysShow: false,
          hidden: false,
          title: '代码生成',
          icon: 'setting',
          keepAlive: true,
          full: false,
          affix: false,
          link: null
        }
      }
    ]
  }
]
export default [
  {
    url: BASE_URL + '/menu/getRouters',
    method: 'get',
    timeout: ResponseEnum.TIMEOUT,
    response: () => {
      return {
        code: ResultEnum.SUCCESS,
        data: list,
        msg: '操作成功'
      }
    }
  }
] as MockMethod[]
